import PaginationDto from "apps/admin/src/dtos/pagination.dto";
import { ArrayMaxSize, ArrayMinSize, IsArray, IsEmpty, IsNotEmpty, IsNumber, IsObject, IsOptional, IsString, Max, MaxLength, Min, MinLength } from "class-validator";

class CommonDto {
    @MaxLength(30)
    @IsNotEmpty()
    @IsString()
    code:string;

    @IsObject()
    values:{[key:string]:string}


    @Min(0)
    @IsNumber()
    @IsOptional()
    sort:number;

}

export class AddDto extends CommonDto {
    @Min(0)
    @IsNumber()
    @IsOptional()
    createTime:number;
}

export class EditDto extends CommonDto {
    
}

export class PageDto extends PaginationDto {
    @MaxLength(30)
    @IsString()
    @IsOptional()
    code:string;
}